const {simulateGenerator} = require("./generator_in_es5")
const {addUser, deleteUser} = require("./PublicExampleUserApi")
const {myRun} = require("./myRun")
let userId = 10;
/**
 * 在es5中模拟生成器
 * @type {(function(): {next: function(*): ({done: boolean, value: *}), throw: function(*): void})|*}
 */
const addUserGenerator = simulateGenerator(()=>{
    return addUser(userId)
})

myRun(addUserGenerator)
